feat(firecracker): prototype host-supervised isolation - #2934
Draft
drew wants to merge 3 commits into
Draft
Conversation
Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com>
Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com>
Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is just a prototype to prove out RFC-0012. No immediate plans to merge.
Adds an experimental Firecracker Isolation Backend and external gateway compute driver on top of the RFC 0012 implementation. The logical supervisor remains on the host, while a private mode of the same driver binary invokes the existing process-supervisor implementation inside a no-NIC guest over authenticated virtio-vsock.
mise run gateway:firecrackernow starts a plaintext local gateway wired to that external driver withoutsudo. If the account already belongs to thekvmgroup but the current shell has stale supplementary groups, the runner re-executes itself withsg kvm.This remains a prototype: it boots the configured ext4 fixture rather than materializing the requested OCI image. Stop, exec, PTY, port forwarding, mediated egress, restart recovery, and per-connection binary identity remain explicit fail-closed follow-ups.
Related Issue
Part of #1737. Prototype follow-on to #2048, stacked on an exact mirror of its implementation branch.
Changes
openshell-driver-firecrackercrate for Firecracker launch, RFC backend lifecycle, gatewayComputeDriverservice, private host-to-guest transport, and guest process-supervisor mode.firecrackerbackend while retaining the current logical supervisor model outside the VM.attach -> confirm -> start_agent.openshell-supervisor-processwith full process enforcement and a driver-resolved numeric identity.CAP_NET_ADMIN, andsudorequirements; host access is limited to/dev/kvm.mise run gateway:firecracker, which builds the gateway, supervisor, and driver; generates local credentials; registers the active gateway; and connects the external driver over a private Unix socket.mise run e2e:firecracker, which clones the rootfs fixture, injects the current driver, boots a real VM, and validates the lifecycle through process exit.Testing
mise run pre-commitcargo test -p openshell-driver-firecracker -p openshell-sandbox(145 passed, 3 privileged namespace helpers ignored)mise run e2e:firecracker(real Firecracker v1.16.1 on KVM)mise run gateway:firecracker, followed by gateway status and info checks confirming a healthy externalfirecrackercompute driversg kvmre-exec with nosudoBINDGEN_EXTRA_CLANG_ARGSunset, verifying automatic GCC architecture-header discovery through thesg kvmtransitionChecklist